package ru.st.selenium;

import java.util.Locale;
import java.util.logging.Formatter;

public class fibonacci {

    public static int executions = 0;

    public static int fibonaci(int n)  {
        executions++;
        System.out.println(executions + " BEGIN FIB=" + n);

        if(n <= 0) return 0;
        if(n == 1)  return 1;
        if(n == 2)  return 1;

        return fibonaci(n - 1) + fibonaci(n - 2);
    }

    public static int factorial(int num) {
        int fact=1;
 
        for (int i=1; i<=num; i++) {
                fact*=i;
        }
 
        return fact;
}

     public static void main(String []args){
        System.out.println("Hello World");

        //fibonaci(11);
                int n = 11;
                int a = 1, b = 1;
                System.out.print(a + " " + b);
                int fib = 2, i = 2;
                while (i < n) {
                    fib = a + b;
                    a = b;
                    b = fib;
                   // System.out.print(" " + fib);
                    i++;
                }
              /*  byte q[] = new byte[80];
                for (int j =0; i< q.length; j++)
                	q[j] = (byte)System.in.read();
                System.out.print("ok");*/
               // Formatter f = new Formatter (Locale.ROOT);
               // f.format("%.2E\n",100.0/3.0);
              //  System.out.printf("%.2E\n",100.0/3.0);
                System.out.printf("%.2f",100.0/3.0);
              //  f.format("%.2f",100.0/3.0);
                //System.out.println(f);
              // System.out.print(" " + factorial(5));
                
                }
          
}


